﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="ImpactaCSharp1DataSet" targetNamespace="http://tempuri.org/ImpactaCSharp1DataSet.xsd" xmlns:mstns="http://tempuri.org/ImpactaCSharp1DataSet.xsd" xmlns="http://tempuri.org/ImpactaCSharp1DataSet.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="ImpactaCSharp1ConnectionString" ConnectionStringObject="" IsAppSettingsProperty="true" Modifier="Assembly" Name="ImpactaCSharp1ConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.Impacta.Capitulo04.Frete.Properties.Settings.GlobalReference.Default.ImpactaCSharp1ConnectionString" Provider="System.Data.SqlClient" />
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="CidadeTableAdapter" GeneratorDataComponentClassName="CidadeTableAdapter" Name="Cidade" UserDataComponentName="CidadeTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="ImpactaCSharp1ConnectionString (Settings)" DbObjectName="ImpactaCSharp1.dbo.Cidade" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="true" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>DELETE FROM [dbo].[Cidade] WHERE (([Id] = @Original_Id) AND ([SiglaEstado] = @Original_SiglaEstado) AND ([Nome] = @Original_Nome))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Id" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiStringFixedLength" Direction="Input" ParameterName="@Original_SiglaEstado" Precision="0" ProviderType="Char" Scale="0" Size="0" SourceColumn="SiglaEstado" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_Nome" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Nome" SourceColumnNullMapping="false" SourceVersion="Original" />
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>INSERT INTO [dbo].[Cidade] ([SiglaEstado], [Nome]) VALUES (@SiglaEstado, @Nome);
SELECT Id, SiglaEstado, Nome FROM Cidade WHERE (Id = SCOPE_IDENTITY())</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiStringFixedLength" Direction="Input" ParameterName="@SiglaEstado" Precision="0" ProviderType="Char" Scale="0" Size="0" SourceColumn="SiglaEstado" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Nome" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Nome" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>SELECT Id, SiglaEstado, Nome FROM dbo.Cidade</CommandText>
                    <Parameters />
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>UPDATE [dbo].[Cidade] SET [SiglaEstado] = @SiglaEstado, [Nome] = @Nome WHERE (([Id] = @Original_Id) AND ([SiglaEstado] = @Original_SiglaEstado) AND ([Nome] = @Original_Nome));
SELECT Id, SiglaEstado, Nome FROM Cidade WHERE (Id = @Id)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiStringFixedLength" Direction="Input" ParameterName="@SiglaEstado" Precision="0" ProviderType="Char" Scale="0" Size="0" SourceColumn="SiglaEstado" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Nome" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Nome" SourceColumnNullMapping="false" SourceVersion="Current" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_Id" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="Id" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiStringFixedLength" Direction="Input" ParameterName="@Original_SiglaEstado" Precision="0" ProviderType="Char" Scale="0" Size="0" SourceColumn="SiglaEstado" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="" DataSourceName="" DbType="AnsiString" Direction="Input" ParameterName="@Original_Nome" Precision="0" ProviderType="VarChar" Scale="0" Size="0" SourceColumn="Nome" SourceColumnNullMapping="false" SourceVersion="Original" />
                      <Parameter AllowDbNull="false" AutogeneratedName="Id" ColumnName="Id" DataSourceName="ImpactaCSharp1.dbo.Cidade" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@Id" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="Id" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="Id" DataSetColumn="Id" />
              <Mapping SourceColumn="SiglaEstado" DataSetColumn="SiglaEstado" />
              <Mapping SourceColumn="Nome" DataSetColumn="Nome" />
            </Mappings>
            <Sources>
              <DbSource ConnectionRef="ImpactaCSharp1ConnectionString (Settings)" DbObjectName="ImpactaCSharp1.dbo.Cidade" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="SelecionarPorEstado" GenerateMethods="Fill" GenerateShortCommands="true" GeneratorSourceName="SelecionarPorEstado" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="true" UserGetMethodName="GetDataBy" UserSourceName="SelecionarPorEstado">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="false">
                    <CommandText>SELECT Id, SiglaEstado, Nome FROM dbo.Cidade where SiglaEstado = @SiglaEstado</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="false" AutogeneratedName="SiglaEstado" ColumnName="SiglaEstado" DataSourceName="ImpactaCSharp1.dbo.Cidade" DataTypeServer="char(2)" DbType="AnsiString" Direction="Input" ParameterName="@SiglaEstado" Precision="0" ProviderType="Char" Scale="0" Size="2" SourceColumn="SiglaEstado" SourceColumnNullMapping="false" SourceVersion="Current" />
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </Sources>
          </TableAdapter>
        </Tables>
        <Sources />
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="ImpactaCSharp1DataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:EnableTableAdapterManager="True" msprop:Generator_DataSetName="ImpactaCSharp1DataSet" msprop:Generator_UserDSName="ImpactaCSharp1DataSet">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Cidade" msprop:Generator_TableClassName="CidadeDataTable" msprop:Generator_TableVarName="tableCidade" msprop:Generator_TablePropName="Cidade" msprop:Generator_RowDeletingName="CidadeRowDeleting" msprop:Generator_UserTableName="Cidade" msprop:Generator_RowChangingName="CidadeRowChanging" msprop:Generator_RowEvHandlerName="CidadeRowChangeEventHandler" msprop:Generator_RowDeletedName="CidadeRowDeleted" msprop:Generator_RowEvArgName="CidadeRowChangeEvent" msprop:Generator_RowChangedName="CidadeRowChanged" msprop:Generator_RowClassName="CidadeRow">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="Id" msdata:ReadOnly="true" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" msprop:Generator_ColumnVarNameInTable="columnId" msprop:Generator_ColumnPropNameInRow="Id" msprop:Generator_ColumnPropNameInTable="IdColumn" msprop:Generator_UserColumnName="Id" type="xs:int" />
              <xs:element name="SiglaEstado" msprop:Generator_ColumnVarNameInTable="columnSiglaEstado" msprop:Generator_ColumnPropNameInRow="SiglaEstado" msprop:Generator_ColumnPropNameInTable="SiglaEstadoColumn" msprop:Generator_UserColumnName="SiglaEstado">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="2" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="Nome" msprop:Generator_ColumnVarNameInTable="columnNome" msprop:Generator_ColumnPropNameInRow="Nome" msprop:Generator_ColumnPropNameInTable="NomeColumn" msprop:Generator_UserColumnName="Nome">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="50" />
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Cidade" />
      <xs:field xpath="mstns:Id" />
    </xs:unique>
  </xs:element>
</xs:schema>